home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
graphic
/
fgdemo10.zip
/
FGDEMO.DOC
< prev
next >
Wrap
Text File
|
1991-10-05
|
17KB
|
330 lines
FGDEMO version 1.0
-----------------------------------------------------------
FGDEMO: the demo program for Fastgraph and Fastgraph/Light
-----------------------------------------------------------
This program illustrates some of the features of the Fastgraph (tm)
graphics library. It was written by Diana Gruber, senior programmer at
Ted Gruber Software. You can contact Ted Gruber Software at the address
and phone numbers listed at the bottom of this file.
FGDEMO is distributed with source code. It was originally compiled with
the Microsoft C 5.1 medium memory model. You may use the source code in
FGDEMO in your own applications. This program requires either Fastgraph
or Fastgraph/Light (tm) to link. If you want to use this code, and you
don't have a copy of Fastgraph, please contact Ted Gruber Software.
---------------
Starting FGDEMO
---------------
You can install FGDEMO on a hard disk or run it from diskette. Just type
FGDEMO at the DOS command prompt. To install FGDEMO on a hard disk,
create a subdirectory and copy all the files from the diskette to the
subdirectory.
-----------
Video modes
-----------
FGDEMO runs in a choice of 4 video modes:
640x200 2-color CGA
640x200 16-color EGA
640x350 16-color EGA
720x348 Hercules monochrome
When you start the program, you will be given a default video mode choice,
and an opportunity to change to one of the other video modes. We suggest
you try all of them, and see what they look like. Note that some of
these video modes may not be available on your system.
--------------
Running FGDEMO
--------------
After you start FGDEMO and choose a video mode, an attractive horizontal
menu bar will appear at the top of the screen. Press any key or click
the left mouse button to get the first pull-down vertical menu. Select a
feature from this or any menu. The menus are intuitive. Select and try
all the features on all the menus.
-------------------
Distributing FGDEMO
-------------------
You may freely distribute FGDEMO as long as all the files are distributed
together in their original unaltered state. If you want to zip the files
together for BBS distribution, please use the file name FGDEMO10.ZIP for
version 1.0 of FGDEMO. The following files are included in the FGDEMO
distribution:
Files required to run FGDEMO
----------------------------
FGDEMO EXE - the program
08PT FNT - font files (packed pixel run format)
14PT FNT
CASINO PPR - graphic file (packed pixel run format)
ORDER FRM - order form (can be printed from File menu)
Documentation
-------------
FGDEMO DOC - this file
Source code for FGDEMO
----------------------
CHAR C - character display and management functions
COMMON C - initialization, termination, general i/o functions
DISPLAY C - functions on Display submenu
EDITOR C - text editor functions
FGDEMO C - function main and screen drawing functions
FILE C - functions on File submenu
FUNDMTLS C - functions on Fundamentals submenu
MENU C - define and manage the horizontal and vertical menus
MISC C - functions on Miscellaneous submenu
UTILITY C - functions on Utilities submenu
VIDEO C - functions on Video submenu
Header files
------------
DEFS H - general declarations and initializations
BITMAPS H - TNT and "Kablooy" bitmaps for explosion
CHAR H - these files contain the function declarations.
COMMON H Each one is associated with a source code file.
DISPLAY H The Microsoft C compiler creates these files
EDITOR H when the /Zg switch is used.
FGDEMO H
FILE H
FUNDMTLS H
MENU H
MISC H
UTILITY H
VIDEO H
Make files
----------
BUILD BAT - batch file to compile and link FGDEMO with Turbo C
FGDEMO PRJ - project make file for Turbo C
WORK - make file for Microsoft C
----------------------------
Compiling and linking FGDEMO
----------------------------
The source code files may be recompiled using either Microsoft C or Turbo
C. The medium memory model is recommended, and the large model will also
work. FGDEMO is too big to use the small memory model.
If you are using Microsoft C, use the make file WORK to compile and link
FGDEMO with the Fastgraph/Light medium model library. If you want to
link FGDEMO with Fastgraph instead of Fastgraph/Light, change the library
name FGLM to FGM in the LINK command.
If you are using Turbo C, Turbo C++, or Borland C++, use the project make
file FGDEMO.PRJ to compile and link FGDEMO. Be sure you've configured
the compiler to use the medium memory model. Alternatively, you can use
the command file BUILD.BAT to perform the compilation and linking.
BUILD.BAT uses the TCC command; you may need to change it for Turbo C++
or Borland C++. If you want to link FGDEMO with Fastgraph instead of
Fastgraph/Light, change the library name FGLM to FGM in the TLINK
command, or in the last line of the project make file.
You may have trouble running FGDEMO in the 640x200x16 color mode in the
Turbo C integrated development environment. That is because the
environment allocates all available memory, making it impossible for
Fastgraph to allocate a virtual video page. FGDEMO requires two video
pages. You should be able to run FGDEMO in the other video modes, and
you should have no trouble compiling, linking, and running FGDEMO from
the DOS command line.
We have had some reports of trouble with older versions of TLINK finding
the Fastgraph or Fastgraph/Light libraries. If you have this problem, be
sure the full path name of the library appears in your TLINK.CFG file. If
that does not solve the problem, include the full library path name in
the TLINK command. We called Borland technical support about this
problem, and they told us there is no TLINK.CFG file supported in Turbo C
version 2.0, but it is supported in Turbo C++ and Borland C++.
----------------------
About the FGDEMO menus
----------------------
The menu structure is defined in the file DEFS.H. A typdef CMD is
defined which is a structure containing information about each menu
item: the function called when the menu choice is activated, the
descriptive name of the menu item, the x and y location of the menu item,
and pointers to the next and previous items on the menu. Each menu is
defined by an array of these structures, and is initialized at the top of
MENU.C.
There are two types of menus: a horizontal menu, which is the moving bar
menu at the top of the screen, and vertical menus, also known as
"pull-down" menus. When a pull-down menu is visible, a menu function may
be activated by either clicking the mouse on a highlighted menu function,
or by pressing <Enter>. Arrow keys are used to highlight the next and
previous menu item, and a mouse may also be used.
User input relevant to the menus is accepted in two places: within the
vertical_menu function (to activate a menu choice), or in the main
function (to control the horizontal menu). The horizontal menu is also
controlled within the vertical menu, to the extent that if an arrow key
is pressed, the next or previous pull-down menu becomes active.
The entire screen, including the horizontal menu and the dithered
background, is drawn at the beginning of the program and stored on the
hidden p